<div class="table-all">
  <div class="table-module">
    <ng-container *ngFor="let block of tableDetailModel.config.modules,let i=index">
      <div *ngIf="block.type=='header'" class="table-header" [ngStyle]="block.blockStyle?block.blockStyle:{}">
        <span>{{block.name}}</span>
        <ng-container *ngIf="block.operate&&(block.operate.bAuthority|BAuthority)">
          <a [ngStyle]="block.operate.style?block.operate.style:{}"
             (click)="block.operate.confirmFun(tableDetailModel.formInfo)">{{block.operate.name}}</a>
        </ng-container>
      </div>
      <div *ngIf="block.type=='block'" class="table-block" [ngStyle]="block.blockStyle?block.blockStyle:{}">
        <span class="table-span">{{block.name}}：</span>
        <div class="table-input">
          <span>{{block.customShowFun ? block.customShowFun(tableDetailModel.formInfo) : tableDetailModel.formInfo[block.field]}}</span>
          <ng-container *ngIf="block.operate&&(block.operate.bAuthority|BAuthority)">
            <a [ngStyle]="block.operate.style?block.operate.style:{}"
               (click)="block.operate.confirmFun(tableDetailModel.formInfo)">{{block.operate.name}}</a>
          </ng-container>
        </div>
      </div>
      <div *ngIf="block.type=='line'" class="table-line" [ngStyle]="block.blockStyle?block.blockStyle:{}">
        <span class="table-span float">{{block.name}}：</span>
        <div class="table-input">
          <span>{{block.customShowFun ? block.customShowFun(tableDetailModel.formInfo) : tableDetailModel.formInfo[block.field]}}</span>
        </div>
      </div>
      <div *ngIf="block.type=='lineImg'" class="table-line" [ngStyle]="block.blockStyle?block.blockStyle:{}">
        <span class="table-span float">{{block.name}}：</span>
        <div class="table-input">
          <img class="line-img" #id src="{{imgHandle(tableDetailModel.formInfo[block.field], id)}}">
        </div>
      </div>
      <div *ngIf="block.type=='dict'" class="table-block" [ngStyle]="block.blockStyle?block.blockStyle:{}">
        <span class="table-span">{{block.name}}：</span>
        <div class="table-input">
          <span>{{tableDetailModel.formInfo[block.field] | dictDesc:block.dictType:block.options|async}}</span>
        </div>
      </div>
      <div *ngIf="block.type=='date'" class="table-block" [ngStyle]="block.blockStyle?block.blockStyle:{}">
        <span class="table-span">{{block.name}}：</span>
        <div class="table-input">
          <span>{{tableDetailModel.formInfo[block.field] | date:block.dateFormat ? block.dateFormat : 'yyyy-MM-dd HH:mm:ss'}}</span>
        </div>
      </div>
    </ng-container>
  </div>
  <div class="table-button">
    <button *ngIf="tableDetailModel.config.revertUrl&&tableDetailModel.config.revertName" nz-button
            (click)="tableDetailModel.config.revertFun?tableDetailModel.config.revertFun():revert(tableDetailModel.config.revertUrl)">
      {{tableDetailModel.config.revertName}}
    </button>
  </div>
</div>
